# This ConfigMap is used to configure a self-hosted Contiv installation.
# It can be used with an external cluster store(etcd or consul) or used
# with the etcd instance being installed as contiv-etcd
kind: ConfigMap
apiVersion: v1
metadata:
  name: contiv-config
  namespace: {{ system_namespace }}
data:
  # The location of your cluster store. This is set to the
  # avdertise-client value below from the contiv-etcd service.
  # Change it to an external etcd/consul instance if required.
  cluster_store: "etcd://127.0.0.1:{{ contiv_etcd_listen_port }}"
  # The CNI network configuration to install on each node.
  cni_config: |-
    {
      "cniVersion": "{{ contiv_cni_version }}",
      "name": "contiv-net",
      "type": "contivk8s"
    }
  config: |-
    {
       "K8S_API_SERVER": "{{ kube_apiserver_endpoint }}",
       "K8S_CA": "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
       "K8S_KEY": "",
       "K8S_CERT": "",
       "K8S_TOKEN": "",
       "SVC_SUBNET": "{{ kube_service_addresses }}"
    }
